from nlhappy.models import GlobalPointerForEntityExtraction

ckpt = '/root/CMeEE/logs/runs/CMeEE-V2/globalpointer4ner/2023-01-31_09-18-40/checkpoints/epoch02_0.734.ckpt'
model = GlobalPointerForEntityExtraction.load_from_checkpoint(ckpt)
text = '得了心脏病'
res = model.predict(text=text)
print(res)